update

FFIB 2 years ago
parent
commit
193f14303a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      api/tenancy_admin_views.py

+ 4 - 0
api/tenancy_admin_views.py

@@ -22,9 +22,13 @@ from utils.kuaidi.synquery import KuaiDi100
22 22
 def shot_list(request, administrator):
23 23
     page = request.POST.get('page', 1)
24 24
     num = request.POST.get('num', 20)
25
+    tenancy_status = request.POST.get('tenancy_status', '')
25 26
     query = request.POST.get('query', '')
26 27
 
27 28
     shots = TenancyShotInfo.objects.filter(status=True).order_by('-pk')
29
+    if tenancy_status != '':
30
+        shots = shots.filter(tenancy_status=tenancy_status)
31
+
28 32
     if query:
29 33
         shots = shots.filter(Q(sn__icontains=query))
30 34
     count = shots.count()